package com.vnp.cooking.fragmentKitchen;

import com.vnp.cooking.R;
import com.vnp.cooking.utils.PreferenceHelper;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class CoverCanhan2 extends Fragment{
	View v;
	private static final String KEY_CONTENT = "FrgGianbepcuatoi:Content";
	private String mContent = "???";
	TextView txtDescription;
	PreferenceHelper preferenceHelper;

	public static CoverCanhan2 newInstance(String content) {
		CoverCanhan2 fragment = new CoverCanhan2();
		fragment.mContent = content;
		return fragment;
	}
	
	

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		 if ((savedInstanceState != null) && savedInstanceState.containsKey(KEY_CONTENT)) {
             mContent = savedInstanceState.getString(KEY_CONTENT);
         }
	}



	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		v = (View) inflater.inflate(R.layout.cover_canhan_2, container,
				false);
		preferenceHelper = new PreferenceHelper(getActivity());
		txtDescription = (TextView) v.findViewById(R.id.txt_description);
		txtDescription.setText(preferenceHelper.getUserAbout());
		return v;
	}
	public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putString(KEY_CONTENT, mContent);
    }
}	
